<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>Duplex</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>


<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
  <li><a href="../modules/Duplex.Application.html">Duplex.Application</a></li>
  <li><a href="../modules/Duplex.Applications.Effect.html">Duplex.Applications.Effect</a></li>
  <li><a href="../modules/Duplex.Applications.GridPie.html">Duplex.Applications.GridPie</a></li>
  <li><a href="../modules/Duplex.Applications.Hydra.html">Duplex.Applications.Hydra</a></li>
  <li><a href="../modules/Duplex.Applications.Instrument.html">Duplex.Applications.Instrument</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.GridLayout.html">Duplex.Applications.Keyboard.GridLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.HarmonicLayout.html">Duplex.Applications.Keyboard.Layouts.HarmonicLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.IsomorphicLayout.html">Duplex.Applications.Keyboard.Layouts.IsomorphicLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.PianoLayout.html">Duplex.Applications.Keyboard.Layouts.PianoLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.html">Duplex.Applications.Keyboard</a></li>
  <li><a href="../modules/Duplex.Applications.Matrix.html">Duplex.Applications.Matrix</a></li>
  <li><a href="../modules/Duplex.Applications.Metronome.html">Duplex.Applications.Metronome</a></li>
  <li><a href="../modules/Duplex.Applications.MidiActions.Bindings.html">Duplex.Applications.MidiActions.Bindings</a></li>
  <li><a href="../modules/Duplex.Applications.MidiActions.html">Duplex.Applications.MidiActions</a></li>
  <li><a href="../modules/Duplex.Applications.Mixer.html">Duplex.Applications.Mixer</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_group.html">Duplex.Applications.Mlrx.Mlrx_group</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_note.html">Duplex.Applications.Mlrx.Mlrx_note</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_pos.html">Duplex.Applications.Mlrx.Mlrx_pos</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_track.html">Duplex.Applications.Mlrx.Mlrx_track</a></li>
  <li><strong>Duplex.Applications.Mlrx</strong></li>
  <li><a href="../modules/Duplex.Applications.Navigator.html">Duplex.Applications.Navigator</a></li>
  <li><a href="../modules/Duplex.Applications.NotesOnWheels.html">Duplex.Applications.NotesOnWheels</a></li>
  <li><a href="../modules/Duplex.Applications.PatternCursor.html">Duplex.Applications.PatternCursor</a></li>
  <li><a href="../modules/Duplex.Applications.PatternSequence.html">Duplex.Applications.PatternSequence</a></li>
  <li><a href="../modules/Duplex.Applications.Recorder.html">Duplex.Applications.Recorder</a></li>
  <li><a href="../modules/Duplex.Applications.Repeater.html">Duplex.Applications.Repeater</a></li>
  <li><a href="../modules/Duplex.Applications.Rotate.html">Duplex.Applications.Rotate</a></li>
  <li><a href="../modules/Duplex.Applications.StepSequencer.html">Duplex.Applications.StepSequencer</a></li>
  <li><a href="../modules/Duplex.Applications.SwitchConfiguration.html">Duplex.Applications.SwitchConfiguration</a></li>
  <li><a href="../modules/Duplex.Applications.TestPad.html">Duplex.Applications.TestPad</a></li>
  <li><a href="../modules/Duplex.Applications.TrackSelector.html">Duplex.Applications.TrackSelector</a></li>
  <li><a href="../modules/Duplex.Applications.Transport.html">Duplex.Applications.Transport</a></li>
  <li><a href="../modules/Duplex.Applications.UIButtonTest.html">Duplex.Applications.UIButtonTest</a></li>
  <li><a href="../modules/Duplex.Applications.XYPad.html">Duplex.Applications.XYPad</a></li>
  <li><a href="../modules/Duplex.Automation.html">Duplex.Automation</a></li>
  <li><a href="../modules/Duplex.Browser.html">Duplex.Browser</a></li>
  <li><a href="../modules/Duplex.BrowserProcess.html">Duplex.BrowserProcess</a></li>
  <li><a href="../modules/Duplex.Canvas.html">Duplex.Canvas</a></li>
  <li><a href="../modules/Duplex.CanvasPoint.html">Duplex.CanvasPoint</a></li>
  <li><a href="../modules/Duplex.ControlMap.html">Duplex.ControlMap</a></li>
  <li><a href="../modules/Duplex.Device.html">Duplex.Device</a></li>
  <li><a href="../modules/Duplex.Display.html">Duplex.Display</a></li>
  <li><a href="../modules/Duplex.Globals.html">Duplex.Globals</a></li>
  <li><a href="../modules/Duplex.Message.html">Duplex.Message</a></li>
  <li><a href="../modules/Duplex.MessageStream.html">Duplex.MessageStream</a></li>
  <li><a href="../modules/Duplex.MidiDevice.html">Duplex.MidiDevice</a></li>
  <li><a href="../modules/Duplex.OscClient.html">Duplex.OscClient</a></li>
  <li><a href="../modules/Duplex.OscDevice.html">Duplex.OscDevice</a></li>
  <li><a href="../modules/Duplex.OscVoiceMgr.html">Duplex.OscVoiceMgr</a></li>
  <li><a href="../modules/Duplex.Preferences.html">Duplex.Preferences</a></li>
  <li><a href="../modules/Duplex.ProcessSlicer.html">Duplex.ProcessSlicer</a></li>
  <li><a href="../modules/Duplex.RoamingDSP.html">Duplex.RoamingDSP</a></li>
  <li><a href="../modules/Duplex.Scheduler.html">Duplex.Scheduler</a></li>
  <li><a href="../modules/Duplex.StateController.html">Duplex.StateController</a></li>
  <li><a href="../modules/Duplex.UIButton.html">Duplex.UIButton</a></li>
  <li><a href="../modules/Duplex.UIButtonStrip.html">Duplex.UIButtonStrip</a></li>
  <li><a href="../modules/Duplex.UIComponent.html">Duplex.UIComponent</a></li>
  <li><a href="../modules/Duplex.UIKey.html">Duplex.UIKey</a></li>
  <li><a href="../modules/Duplex.UIKeyPressure.html">Duplex.UIKeyPressure</a></li>
  <li><a href="../modules/Duplex.UILabel.html">Duplex.UILabel</a></li>
  <li><a href="../modules/Duplex.UIPad.html">Duplex.UIPad</a></li>
  <li><a href="../modules/Duplex.UIPitchBend.html">Duplex.UIPitchBend</a></li>
  <li><a href="../modules/Duplex.UISlider.html">Duplex.UISlider</a></li>
  <li><a href="../modules/Duplex.UISpinner.html">Duplex.UISpinner</a></li>
  <li><a href="../modules/Duplex.WidgetHooks.html">Duplex.WidgetHooks</a></li>
  <li><a href="../modules/Duplex.WidgetKeyboard.html">Duplex.WidgetKeyboard</a></li>
  <li><a href="../modules/Duplex.html">Duplex</a></li>
  <li><a href="../modules/main.html">main</a></li>
</ul>

</div>

<div id="content">

<h1>Module <code>Duplex.Applications.Mlrx</code></h1>
<p>Mlrx is a comphrehensive live performance environment for Renoise.</p>
<p>

<p>Inheritance: <a href="../modules/Duplex.Application.html#">Duplex.Application</a> > Duplex.Application.Mlrx </p>

<h3>Features</h3>

<ul>
    <li>Independantly playing samples and/or phrases in any tempo</li>
    <li>Many triggering modes and options can be defined for each track</li>
    <li>Supports samples, sliced samples and phrases </li>
    <li>"Streaming" output means seamless transitions between patterns, loops</li>
    <li>Record everything you do into patterns or phrases (create from scratch)</li>
    <li>Non-invasive workflow: tightly integrated with Renoise </li>
    <li>Heavily inspired by mlr by tehn for the monome </li>
</ul>

<h3>Discuss</h3>

<p>Tool discussion is located on the <a href="http://forum.renoise.com/index.php?/topic/38924-new-tool-30-mlrx/">Renoise forum</a></p>

<h3>Changes</h3>

<p>  0.99.1</p>
<pre><code>- Realtime recording into phrases
</code></pre>

<p>  0.99</p>
<pre><code>- Many new features, better integration with Renoise
</code></pre>

<p>  0.98</p>
<pre><code>- First release
</code></pre>


</p>


<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#__init">__init (VarArg)</a></td>
	<td class="summary">Constructor method</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_idle">on_idle ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update">update ()</a></td>
	<td class="summary">Update all UI components, called when initializing</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_track_task">update_track_task ()</a></td>
	<td class="summary">Update track-related UI components</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#initialize_app">initialize_app ()</a></td>
	<td class="summary">Reset the state of the application, make it ready for a new session</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#clear_references">clear_references ()</a></td>
	<td class="summary">Remove references to active song, stop running tasks</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#start_app">start_app (start_running)</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#stop_app">stop_app ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_release_document">on_release_document ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_new_document">on_new_document ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_app">_build_app ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_enable_track_observable">_enable_track_observable ()</a></td>
	<td class="summary">Enable track observables with some delay</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_attach_to_song">_attach_to_song ()</a></td>
	<td class="summary">Add notifiers to song
 invoked when first run, and when a new document becomes available</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#rebuild_indices">rebuild_indices ()</a></td>
	<td class="summary">Rebuild indices when the tracks_observable require it -
 when we encounter a condition that may have changed the track order</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#delete_track_at">delete_track_at (idx)</a></td>
	<td class="summary">Delete RenoiseTrack at provided index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#insert_track_at">insert_track_at (idx)</a></td>
	<td class="summary">Insert RenoiseTrack at provided index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#panic">panic ()</a></td>
	<td class="summary">Cancel notes in all groups, reset state
 invoked when we exit edit mode / stop playing / stop application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#get_group_index">get_group_index (grp)</a></td>
	<td class="summary">Method for discovering this group's index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#import_or_create">import_or_create ()</a></td>
	<td class="summary">Look for an existing session in the song,
 or (if not found) initialize a new session</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#retrieve_group_track_index">retrieve_group_track_index ()</a></td>
	<td class="summary">Retrieve the mlrx group-track index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#retrieve_local_settings">retrieve_local_settings ()</a></td>
	<td class="summary">Retrive and apply the locally stored settings</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#store_local_settings">store_local_settings ()</a></td>
	<td class="summary">Output the current mlrx settings as a lua string in the song comments</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#initiate_settings_task">initiate_settings_task ()</a></td>
	<td class="summary">This method is called each time one of the local settings change</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#clear_settings_task">clear_settings_task ()</a></td>
	<td class="summary">This method is called each time one of the local settings change</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#select_track">select_track (idx)</a></td>
	<td class="summary">Select provided logical track, update Renoise focus?</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#assign_track">assign_track (group_idx, track_idx, programmatic)</a></td>
	<td class="summary">Assign the provided track to this group</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#erase_pattern">erase_pattern ()</a></td>
	<td class="summary">Erase the current pattern</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#clone_pattern">clone_pattern (seq_idx, migrate_playpos)</a></td>
	<td class="summary">Clone the pattern, while moving the playhead to the new pattern</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_matrix">update_matrix ()</a></td>
	<td class="summary">Update visual display of groups assignments</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_arp_mode">update_arp_mode ()</a></td>
	<td class="summary">Update display of arpeggiator controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_toggle_loop">update_toggle_loop (trk)</a></td>
	<td class="summary">Update display of loop toggle control</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_group_toggles">update_group_toggles ()</a></td>
	<td class="summary">Update display of group toggle controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_track_levels">update_track_levels (match_trk)</a></td>
	<td class="summary">Update display of track level controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_track_panning">update_track_panning (match_trk)</a></td>
	<td class="summary">Update display of track panning controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_track_shuffle">update_track_shuffle (trk)</a></td>
	<td class="summary">Update display of shuffle controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_track_drift">update_track_drift (trk)</a></td>
	<td class="summary">Update display of drift controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_group_levels">update_group_levels (match_grp)</a></td>
	<td class="summary">Update display of group level controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_group_panning">update_group_panning (match_grp)</a></td>
	<td class="summary">Update display of group panning controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_automation_mode">update_automation_mode ()</a></td>
	<td class="summary">Update display of automation-mode control</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_track_selector">update_track_selector ()</a></td>
	<td class="summary">Update display of track-select control</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_linesync">update_linesync (trk)</a></td>
	<td class="summary">Update sync button (light up if sample is synced)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_trigger_mode">update_trigger_mode ()</a></td>
	<td class="summary">Update display of trigger mode buttons</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_output_filter">update_output_filter ()</a></td>
	<td class="summary">Update display of trigger mode buttons</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_cycle_length">update_cycle_length ()</a></td>
	<td class="summary">Update display of cycle-length buttons</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#decorate_tracks">decorate_tracks ()</a></td>
	<td class="summary">Update color &amp; name of all tracks within the mlrx-group</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#flash_automation_button">flash_automation_button ()</a></td>
	<td class="summary">Momentarily flash the automation button</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#cycle_automation_mode">cycle_automation_mode ()</a></td>
	<td class="summary">Cycle through the available automation modes</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_sound_source">update_sound_source ()</a></td>
	<td class="summary">Update display of the source-select controls</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#get_trigger_ctrl">get_trigger_ctrl (trk, trigger_idx)</a></td>
	<td class="summary">Provided with track and trigger index, retrieve the control</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_trigger_pos">update_trigger_pos (trk_idx, trigger_idx)</a></td>
	<td class="summary">Update the lit position on the controller, called from the track itself</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#trigger_feedback">trigger_feedback (trk_idx, trigger_idx, duration)</a></td>
	<td class="summary">Provide some quick feedback on the controller (flashing buttons)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#purge_instruments">purge_instruments (first_run)</a></td>
	<td class="summary">After having swapped, loaded or removed instruments we call this function
 this will re-attach all instruments</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#update_summary">update_summary (trk_idx)</a></td>
	<td class="summary">Update label displaying summary of track(s)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#get_pos_diff">get_pos_diff (pos1, pos2)</a></td>
	<td class="summary">Obtain the difference in lines between two song-positions
 note: when the pattern is the same, we ignore the sequence and assume
 that pos1 comes before pos2 (so, a 64-line pattern containing two
 positions: 63 and 1 would result in 2 lines)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#get_quantize">get_quantize ()</a></td>
	<td class="summary">Set the current quantize amount from renoise</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#pattern_is_looped">pattern_is_looped ()</a></td>
	<td class="summary">Expanded check for looped pattern, will also consider if the (currently
 playing) pattern is looped by means of a pattern sequence loop</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#count_lines">count_lines (seq_idx)</a></td>
	<td class="summary">Count number of lines in a pattern</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_edit_mode_change">on_edit_mode_change ()</a></td>
	<td class="summary">Stop any active recordings</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_host_tempo_change">on_host_tempo_change ()</a></td>
	<td class="summary">This function will update the duration of phrases and unsynced samples,
 and compute a new 'writeahead' time.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#determine_metronome">determine_metronome ()</a></td>
	<td class="summary">Provide timing for certain events (i.e.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#select_midi_port">select_midi_port (port_idx)</a></td>
	<td class="summary">Initialize MIDI input</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#midi_callback">midi_callback (message)</a></td>
	<td class="summary">Receive MIDI from device</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#input_xy">input_xy (val)</a></td>
	<td class="summary">Generic routing of XY-Pad signal (e.g.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#input_key_velocity">input_key_velocity ()</a></td>
	<td class="summary">Called when keyboard velocity is changed in Renoise</td>
	</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#self._controls">self._controls</a></td>
	<td class="summary">keep references to our UI controls here</td>
	</tr>
</table>

<br/>
<br/>


    <h2><a name="Functions"></a>Functions</h2>
    <dl class="function">
    <dt>
    <a name = "__init"></a>
    <strong>__init (VarArg)</strong>
    </dt>
    <dd>
    Constructor method


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">VarArg</span>
        )
        </li>
    </ul>



    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#">Duplex.Application</a>
    </ul>


</dd>
    <dt>
    <a name = "on_idle"></a>
    <strong>on_idle ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#on_idle">Duplex.Application.on_idle</a>
    </ul>


</dd>
    <dt>
    <a name = "update"></a>
    <strong>update ()</strong>
    </dt>
    <dd>
    Update all UI components, called when initializing







</dd>
    <dt>
    <a name = "update_track_task"></a>
    <strong>update_track_task ()</strong>
    </dt>
    <dd>
    Update track-related UI components







</dd>
    <dt>
    <a name = "initialize_app"></a>
    <strong>initialize_app ()</strong>
    </dt>
    <dd>
    Reset the state of the application, make it ready for a new session







</dd>
    <dt>
    <a name = "clear_references"></a>
    <strong>clear_references ()</strong>
    </dt>
    <dd>
    Remove references to active song, stop running tasks







</dd>
    <dt>
    <a name = "start_app"></a>
    <strong>start_app (start_running)</strong>
    </dt>
    <dd>
    inherited from Application


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">start_running</span>



        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

        bool or nil
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#start_app">Duplex.Application.start_app</a>
    </ul>


</dd>
    <dt>
    <a name = "stop_app"></a>
    <strong>stop_app ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#stop_app">Duplex.Application.stop_app</a>
    </ul>


</dd>
    <dt>
    <a name = "on_release_document"></a>
    <strong>on_release_document ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#on_release_document">Duplex.Application.on_release_document</a>
    </ul>


</dd>
    <dt>
    <a name = "on_new_document"></a>
    <strong>on_new_document ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#on_new_document">Duplex.Application.on_new_document</a>
    </ul>


</dd>
    <dt>
    <a name = "_build_app"></a>
    <strong>_build_app ()</strong>
    </dt>
    <dd>
    inherited from Application



    <h3>Returns:</h3>
    <ol>

        bool
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#_build_app">Duplex.Application._build_app</a>
    </ul>


</dd>
    <dt>
    <a name = "_enable_track_observable"></a>
    <strong>_enable_track_observable ()</strong>
    </dt>
    <dd>
    Enable track observables with some delay







</dd>
    <dt>
    <a name = "_attach_to_song"></a>
    <strong>_attach_to_song ()</strong>
    </dt>
    <dd>
    Add notifiers to song
 invoked when first run, and when a new document becomes available







</dd>
    <dt>
    <a name = "rebuild_indices"></a>
    <strong>rebuild_indices ()</strong>
    </dt>
    <dd>
    Rebuild indices when the tracks_observable require it -
 when we encounter a condition that may have changed the track order







</dd>
    <dt>
    <a name = "delete_track_at"></a>
    <strong>delete_track_at (idx)</strong>
    </dt>
    <dd>
    Delete RenoiseTrack at provided index


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">idx</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "insert_track_at"></a>
    <strong>insert_track_at (idx)</strong>
    </dt>
    <dd>
    Insert RenoiseTrack at provided index


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">idx</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "panic"></a>
    <strong>panic ()</strong>
    </dt>
    <dd>
    Cancel notes in all groups, reset state
 invoked when we exit edit mode / stop playing / stop application







</dd>
    <dt>
    <a name = "get_group_index"></a>
    <strong>get_group_index (grp)</strong>
    </dt>
    <dd>
    Method for discovering this group's index


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">grp</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "import_or_create"></a>
    <strong>import_or_create ()</strong>
    </dt>
    <dd>
    Look for an existing session in the song,
 or (if not found) initialize a new session







</dd>
    <dt>
    <a name = "retrieve_group_track_index"></a>
    <strong>retrieve_group_track_index ()</strong>
    </dt>
    <dd>
    Retrieve the mlrx group-track index



    <h3>Returns:</h3>
    <ol>

        int (1 - number of sequencer tracks), #number of members
    </ol>




</dd>
    <dt>
    <a name = "retrieve_local_settings"></a>
    <strong>retrieve_local_settings ()</strong>
    </dt>
    <dd>
    Retrive and apply the locally stored settings







</dd>
    <dt>
    <a name = "store_local_settings"></a>
    <strong>store_local_settings ()</strong>
    </dt>
    <dd>
    Output the current mlrx settings as a lua string in the song comments







</dd>
    <dt>
    <a name = "initiate_settings_task"></a>
    <strong>initiate_settings_task ()</strong>
    </dt>
    <dd>
    This method is called each time one of the local settings change







</dd>
    <dt>
    <a name = "clear_settings_task"></a>
    <strong>clear_settings_task ()</strong>
    </dt>
    <dd>
    This method is called each time one of the local settings change







</dd>
    <dt>
    <a name = "select_track"></a>
    <strong>select_track (idx)</strong>
    </dt>
    <dd>
    Select provided logical track, update Renoise focus?


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">idx</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "assign_track"></a>
    <strong>assign_track (group_idx, track_idx, programmatic)</strong>
    </dt>
    <dd>
    Assign the provided track to this group


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">group_idx</span>
         (int) - the Mlrx-group index
        </li>
        <li><span class="parameter">track_idx</span>
         (int) - the Mlrx-track index
        </li>
        <li><span class="parameter">programmatic</span>
         (bool), when function is invoked by the app itself
        </li>
    </ul>





</dd>
    <dt>
    <a name = "erase_pattern"></a>
    <strong>erase_pattern ()</strong>
    </dt>
    <dd>
    Erase the current pattern







</dd>
    <dt>
    <a name = "clone_pattern"></a>
    <strong>clone_pattern (seq_idx, migrate_playpos)</strong>
    </dt>
    <dd>
    Clone the pattern, while moving the playhead to the new pattern


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">seq_idx</span>



        </li>
        <li><span class="parameter">migrate_playpos</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_matrix"></a>
    <strong>update_matrix ()</strong>
    </dt>
    <dd>
    Update visual display of groups assignments







</dd>
    <dt>
    <a name = "update_arp_mode"></a>
    <strong>update_arp_mode ()</strong>
    </dt>
    <dd>
    Update display of arpeggiator controls







</dd>
    <dt>
    <a name = "update_toggle_loop"></a>
    <strong>update_toggle_loop (trk)</strong>
    </dt>
    <dd>
    Update display of loop toggle control


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_group_toggles"></a>
    <strong>update_group_toggles ()</strong>
    </dt>
    <dd>
    Update display of group toggle controls







</dd>
    <dt>
    <a name = "update_track_levels"></a>
    <strong>update_track_levels (match_trk)</strong>
    </dt>
    <dd>
    Update display of track level controls


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">match_trk</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_track_panning"></a>
    <strong>update_track_panning (match_trk)</strong>
    </dt>
    <dd>
    Update display of track panning controls


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">match_trk</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_track_shuffle"></a>
    <strong>update_track_shuffle (trk)</strong>
    </dt>
    <dd>
    Update display of shuffle controls


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_track_drift"></a>
    <strong>update_track_drift (trk)</strong>
    </dt>
    <dd>
    Update display of drift controls


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_group_levels"></a>
    <strong>update_group_levels (match_grp)</strong>
    </dt>
    <dd>
    Update display of group level controls


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">match_grp</span>
         (Mlrx_group), update only a specific group
        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_group_panning"></a>
    <strong>update_group_panning (match_grp)</strong>
    </dt>
    <dd>
    Update display of group panning controls


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">match_grp</span>
         (Mlrx_group), update only a specific group
        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_automation_mode"></a>
    <strong>update_automation_mode ()</strong>
    </dt>
    <dd>
    Update display of automation-mode control







</dd>
    <dt>
    <a name = "update_track_selector"></a>
    <strong>update_track_selector ()</strong>
    </dt>
    <dd>
    Update display of track-select control







</dd>
    <dt>
    <a name = "update_linesync"></a>
    <strong>update_linesync (trk)</strong>
    </dt>
    <dd>
    Update sync button (light up if sample is synced)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_trigger_mode"></a>
    <strong>update_trigger_mode ()</strong>
    </dt>
    <dd>
    Update display of trigger mode buttons







</dd>
    <dt>
    <a name = "update_output_filter"></a>
    <strong>update_output_filter ()</strong>
    </dt>
    <dd>
    Update display of trigger mode buttons







</dd>
    <dt>
    <a name = "update_cycle_length"></a>
    <strong>update_cycle_length ()</strong>
    </dt>
    <dd>
    Update display of cycle-length buttons







</dd>
    <dt>
    <a name = "decorate_tracks"></a>
    <strong>decorate_tracks ()</strong>
    </dt>
    <dd>
    Update color &amp; name of all tracks within the mlrx-group







</dd>
    <dt>
    <a name = "flash_automation_button"></a>
    <strong>flash_automation_button ()</strong>
    </dt>
    <dd>
    Momentarily flash the automation button







</dd>
    <dt>
    <a name = "cycle_automation_mode"></a>
    <strong>cycle_automation_mode ()</strong>
    </dt>
    <dd>
    Cycle through the available automation modes







</dd>
    <dt>
    <a name = "update_sound_source"></a>
    <strong>update_sound_source ()</strong>
    </dt>
    <dd>
    Update display of the source-select controls







</dd>
    <dt>
    <a name = "get_trigger_ctrl"></a>
    <strong>get_trigger_ctrl (trk, trigger_idx)</strong>
    </dt>
    <dd>
    Provided with track and trigger index, retrieve the control


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk</span>



        </li>
        <li><span class="parameter">trigger_idx</span>



        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

        UIButton
    </ol>




</dd>
    <dt>
    <a name = "update_trigger_pos"></a>
    <strong>update_trigger_pos (trk_idx, trigger_idx)</strong>
    </dt>
    <dd>
    Update the lit position on the controller, called from the track itself


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk_idx</span>
         (int) the index of the Mlrx_track instance
        </li>
        <li><span class="parameter">trigger_idx</span>
         (int) optional, the position to light up (omit to clear)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "trigger_feedback"></a>
    <strong>trigger_feedback (trk_idx, trigger_idx, duration)</strong>
    </dt>
    <dd>
    Provide some quick feedback on the controller (flashing buttons)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk_idx</span>



        </li>
        <li><span class="parameter">trigger_idx</span>



        </li>
        <li><span class="parameter">duration</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "purge_instruments"></a>
    <strong>purge_instruments (first_run)</strong>
    </dt>
    <dd>
    After having swapped, loaded or removed instruments we call this function
 this will re-attach all instruments


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">first_run</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "update_summary"></a>
    <strong>update_summary (trk_idx)</strong>
    </dt>
    <dd>
    Update label displaying summary of track(s)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">trk_idx</span>
         (int), limit update to this track
        </li>
    </ul>





</dd>
    <dt>
    <a name = "get_pos_diff"></a>
    <strong>get_pos_diff (pos1, pos2)</strong>
    </dt>
    <dd>
    Obtain the difference in lines between two song-positions
 note: when the pattern is the same, we ignore the sequence and assume
 that pos1 comes before pos2 (so, a 64-line pattern containing two
 positions: 63 and 1 would result in 2 lines)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">pos1</span>



        </li>
        <li><span class="parameter">pos2</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "get_quantize"></a>
    <strong>get_quantize ()</strong>
    </dt>
    <dd>
    Set the current quantize amount from renoise







</dd>
    <dt>
    <a name = "pattern_is_looped"></a>
    <strong>pattern_is_looped ()</strong>
    </dt>
    <dd>
    Expanded check for looped pattern, will also consider if the (currently
 playing) pattern is looped by means of a pattern sequence loop







</dd>
    <dt>
    <a name = "count_lines"></a>
    <strong>count_lines (seq_idx)</strong>
    </dt>
    <dd>
    Count number of lines in a pattern


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">seq_idx</span>



        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

        int (the number of pattern lines), or nil if not found
    </ol>




</dd>
    <dt>
    <a name = "on_edit_mode_change"></a>
    <strong>on_edit_mode_change ()</strong>
    </dt>
    <dd>
    Stop any active recordings







</dd>
    <dt>
    <a name = "on_host_tempo_change"></a>
    <strong>on_host_tempo_change ()</strong>
    </dt>
    <dd>
    This function will update the duration of phrases and unsynced samples,
 and compute a new 'writeahead' time.  Note that if BPM is changed constantly
 change (via automation or otherwise), the task will never execute...







</dd>
    <dt>
    <a name = "determine_metronome"></a>
    <strong>determine_metronome ()</strong>
    </dt>
    <dd>
    Provide timing for certain events (i.e.  blinking lights)







</dd>
    <dt>
    <a name = "select_midi_port"></a>
    <strong>select_midi_port (port_idx)</strong>
    </dt>
    <dd>
    Initialize MIDI input


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">port_idx</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "midi_callback"></a>
    <strong>midi_callback (message)</strong>
    </dt>
    <dd>
    Receive MIDI from device


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">message</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "input_xy"></a>
    <strong>input_xy (val)</strong>
    </dt>
    <dd>
    Generic routing of XY-Pad signal (e.g.  tilt sensor on monome)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">val</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "input_key_velocity"></a>
    <strong>input_key_velocity ()</strong>
    </dt>
    <dd>
    Called when keyboard velocity is changed in Renoise







</dd>
</dl>
    <h2><a name="Fields"></a>Fields</h2>
    <dl class="function">
    <dt>
    <a name = "self._controls"></a>
    <strong>self._controls</strong>
    </dt>
    <dd>
    keep references to our UI controls here







</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.2</a></i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
